﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//飞机 小鸟 超人
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Aircraft AI = new Aircraft("飞机");
            AI.LL();
            Console.WriteLine("--------------------------");
            Birdie BI = new Birdie("小鸟");
            BI.UU();
            Console.WriteLine("--------------------------");
            Superman SU = new Superman("超人");
            SU.TT();
            Console.WriteLine("--------------------------");
        }
    }
    class Person
    {
        private string name;
        public string Name { get => name; set => name = value; }
        public Person(string name) 
        {
            this.name = name;
        }
        public Person() { }
        public void YYY() 
        {
            Console.WriteLine("我是{0}，我会飞",this.name);
        }
    }
    interface IPerson 
    {
        void TT();
    }//人
    interface IAnimal 
    {
        void UU();
    }//动物
    interface IInstrument
    {
        void LL();
    }//代步工具
    class Aircraft : Person, IInstrument//飞机
    {
        private string name;
        public string Name1 { get => name; set => name = value; }
        public Aircraft(string name) :base(name)
        {

        }
        public Aircraft() { }
        public void LL()
        {
            base.YYY();
            Console.WriteLine("我可以飞万米高空");
        }
    }
    class Birdie : Person, IAnimal//小鸟
    {
        private string name;
        public string Name1 { get => name; set => name = value; }
        public Birdie(string name) : base(name)
        {

        }
        public Birdie() { }
        public void UU()
        {
            base.YYY();
            Console.WriteLine("我可以消灭害虫");
        }
    }
    class Superman : Person, IPerson//超人
    {
        private string name;
        public string Name1 { get => name; set => name = value; }
        public Superman(string name) : base(name)
        {

        }
        public Superman() { }
        public void TT()
        {
            base.YYY();
            Console.WriteLine("我可以拯救世界");
        }
    }


}
